# $Id: PKGBUILD 80160 2012-11-17 01:18:35Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Geoffrey Teale <tealeg@stop-squark>
# Contributor: Mark, Huo Mian <markhuomian[at]gmail[dot]com>
# Contributor: Biginoz <biginoz a free dot fr>

pkgname=redshift
pkgver=1.7
pkgrel=5
pkgdesc='Adjusts the color temperature of your screen according to your surroundings.'
arch=('i686' 'x86_64')
url='http://jonls.dk/redshift/'
license=('GPL3')
depends=('gconf' 'geoclue' 'libxxf86vm')
optdepends=('pygtk: for gtk-redshift'
            'pyxdg: for gtk-redshift'
            'librsvg: for gtk-redshift')
makedepends=('python2')
install='redshift.install'
source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.bz2")
md5sums=('c56512afa292b5a94b715ed4a1841d4c')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  sed -i 's/python/python2/' src/gtk-redshift/gtk-redshift

  PYTHON=/usr/bin/python2 ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
